<template>
  <div>
    <div class="mb-2">{{ editorTitle }}</div>
    <el-input
      :rows="5"
      type="textarea"
      :placeholder="`请输入${editorTitle}`"
      v-model="text"
      @update:modelValue="inputHandle"
    />
  </div>
</template>

<script setup lang="ts">
import type { IUpdateStatus } from "@/types/common";

const props = defineProps<{
  status: string;
  isShow: boolean;
  name: string;
  statusKey: string;
  id: string;
  editCom: Component;
  editorTitle: string;
}>();

const updateStatus = inject("updateStatus") as IUpdateStatus;

// ^ 标题内容
const text = ref(props.status);

const inputHandle = (value: string) => {
  updateStatus(props.statusKey, value);
};
</script>

<style scoped></style>
